<div class="hot_container" >
  <div class="title"><span class='title_content'>用户列表</span></div>
  <table class="admin"  cellpadding="0" cellspacing="0" >
    <thead>
      <th>用户名</th>
      <th>email</th>
      <th>角色</th>
      <th colspan="2"></th>
    </thead>
    <% for user in @users %>
      <tr>
        <td><%= user.login%></td>
        <td><%= user.email %></td>
        <td><%= user.roles.map{|r| r.name}.join(",") %></td>
        <td style="width:6em;" class="action_link"><%= link_to '编辑角色',"/users/list_role/#{user.id}",:class=>"action_edit" %></td>
     
        <td style="width:4em;" class="action_link"><%= link_to '删除', user, :confirm => '确定删除?', :method => :delete,:class=>"action_delete" %></td>
      </tr>
    <% end %>
  </table>
  <%= will_paginate @users,:prev_label => '«上一页',:next_label => '下一页»' %>
</div>
